package com.xziying.appstore.plugIn.domain;

import java.util.ArrayList;
import java.util.List;

/**
 * Parameter
 *
 * @author : xziying
 * @create : 2021-04-05 14:49
 */
public class EventInfo {
    /**
     * 处理事件
     * @param robotVersion 来着框架版本 1 ER框架
     * @param fromQQ 来源机器人QQ
     * @param messageType   接收到消息类型，该类型可在常量表中查询具体定义，此处仅列举： -1 未定义事件 0,在线状态临时会话 1,好友信息 2,群信息 3,讨论组信息 4,群临时会话 5,讨论组临时会话 6,财付通转账 7,好友验证回复会话
     * @param messageSubtype 此参数在不同ER_下，有不同的定义，暂定：接收财付通转账时 1待确认收款 0为已收款    有人请求入群时，不良成员这里为1
     * @param source    此消息的来源，如：群号、讨论组ID、临时会话QQ、好友QQ等
     * @param triggerActive 主动发送这条消息的QQ，踢人时为踢人管理员QQ
     * @param triggerPassive    被动触发的QQ，如某人被踢出群，则此参数为被踢出人QQ
     * @param message   此参数有多重含义，常见为：对方发送的消息内容，但当ER_消息类型为 某人申请入群，则为入群申请理由,当消息类型为财付通转账时为 原始json
     * @param args  保留参数位
     */
    int robotVersion;
    String fromQQ;
    int messageType;
    int messageSubtype;
    String source;
    String triggerActive;
    String triggerPassive;
    String message;
    List<Object> args;

    public EventInfo(int robotVersion, String fromQQ, int messageType, int messageSubtype, String source, String triggerActive, String triggerPassive, String message) {
        this.robotVersion = robotVersion;
        this.fromQQ = fromQQ;
        this.messageType = messageType;
        this.messageSubtype = messageSubtype;
        this.source = source;
        this.triggerActive = triggerActive;
        this.triggerPassive = triggerPassive;
        this.message = message;
        this.args = new ArrayList<Object>();
    }

    public EventInfo(int robotVersion, String fromQQ, int messageType, int messageSubtype, String source, String triggerActive, String triggerPassive, String message, List<Object> args) {
        this.robotVersion = robotVersion;
        this.fromQQ = fromQQ;
        this.messageType = messageType;
        this.messageSubtype = messageSubtype;
        this.source = source;
        this.triggerActive = triggerActive;
        this.triggerPassive = triggerPassive;
        this.message = message;
        this.args = args;
    }

    public int getRobotVersion() {
        return robotVersion;
    }

    public void setRobotVersion(int robotVersion) {
        this.robotVersion = robotVersion;
    }

    public String getFromQQ() {
        return fromQQ;
    }

    public void setFromQQ(String fromQQ) {
        this.fromQQ = fromQQ;
    }

    public int getMessageType() {
        return messageType;
    }

    public void setMessageType(int messageType) {
        this.messageType = messageType;
    }

    public int getMessageSubtype() {
        return messageSubtype;
    }

    public void setMessageSubtype(int messageSubtype) {
        this.messageSubtype = messageSubtype;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getTriggerActive() {
        return triggerActive;
    }

    public void setTriggerActive(String triggerActive) {
        this.triggerActive = triggerActive;
    }

    public String getTriggerPassive() {
        return triggerPassive;
    }

    public void setTriggerPassive(String triggerPassive) {
        this.triggerPassive = triggerPassive;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public List<Object> getArgs() {
        return args;
    }

    public void setArgs(List<Object> args) {
        this.args = args;
    }

    @Override
    public String toString() {
        return "Parameter{" +
                "robotVersion=" + robotVersion +
                ", fromQQ='" + fromQQ + '\'' +
                ", messageType=" + messageType +
                ", messageSubtype=" + messageSubtype +
                ", source='" + source + '\'' +
                ", triggerActive='" + triggerActive + '\'' +
                ", triggerPassive='" + triggerPassive + '\'' +
                ", message='" + message + '\'' +
                ", args=" + args +
                '}';
    }
}
